Skip to content

fix(platform): remove scan copies on uninstall - #925

Merged
Brooooooklyn merged 2 commits into
mainfrom
fix/uninstall-scanner-copies
Nov 26, 2026
Merged

Brooooooklyn merged 2 commits into
mainfrom
fix/uninstall-scanner-copies

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

Problem

Found while uninstalling a live test install. void platform uninstall removes the security scanner's gate, controller, container applications and images, but leaves the runtime-copy pieces behind:

void-security-copies-<h>        dispatch namespace   ← left
void-security-copy-sandbox-<h>  Worker               ← left
void-sec-copy-<h>-*             D1 / KV / R2 a failed scan left  ← left

The API's hourly sweep cleans copies while the platform runs, so after uninstall nothing removes them. The uninstall guide already says these are deleted.

Fix

After the controller is gone (it is the only Worker that binds them):

read sandbox settings ── owner marker not ours? ──► keep both, report
        │ ours / absent
        ▼
delete copy namespace (Cloudflare deletes any copy still in it)
delete D1 / KV / R2 named void-sec-copy-<h>-*
delete copy sandbox
  • This also runs when the controller is already gone. In that case a 403 counts as "nothing to remove", the same rule the scanner images use.
  • The plan text and the CLI reference now say "its scan copies".

Tests

New packages/void/test/unit/platform-security-audits.test.ts:

  • copy names match what the API creates
  • delete order: controller → namespace → stores → sandbox
  • a sandbox that belongs to another installation is kept, along with its namespace
  • 403 with no scanner → nothing deleted, no error

vp check and vp run test pass.

🤖 Generated with Claude Code

Uninstall removed the security scanner controller, gate, container
applications and images, but left the runtime-copy dispatch namespace
`void-security-copies-<h>`, the copy sandbox Worker
`void-security-copy-sandbox-<h>`, and any D1, KV or R2 store a failed scan
left. The API's hourly sweep stops with the platform, so nothing removed
them afterwards. Found while uninstalling a live test install.

Uninstall now deletes them after the controller: the namespace (with any
copy still in it), the prefixed stores, then the sandbox. A sandbox that
does not carry this installation's owner marker is kept and reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T07:47:23.425402Z 511e1e1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 511e1e1b23

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-uninstall-scanner-copies-void-cloud.voidzero-docs.workers.dev (commit f561d26)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9498e869-void-cloud.voidzero-docs.workers.dev f561d26 2026-11-26T07:53:04.228Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://602c5c96-void-cloud.voidzero-docs.workers.dev 511e1e1 2026-11-26T07:47:53.249Z Visit the dashboard ↗

Cloudflare deletes only an empty bucket, and a copy bucket may hold what the
scanned app wrote, which would stop uninstall partway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Brooooooklyn
Brooooooklyn merged commit b73d577 into main Nov 26, 2026
22 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/uninstall-scanner-copies branch November 26, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant